package com.atguigu.gmallpublisher.controller;

import com.atguigu.gmallpublisher.service.SugarService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Map;

@RestController
@RequestMapping("/sugar")
public class Controller {
    private SugarService sugarService;
//    public Map<String,Integer> getKeyWord(@RequestParam(value = "date", defaultValue = "0") int date,
//                             @RequestParam(value ="limit",defaultValue = "0")int limit){
//
//        if (date==0){
//            date=getToday();
//        }
//        // TODO: 2023/3/30 查询keyword
//        Map<String, Integer> keyWord = sugarService.getKeyWord( date, limit );
//        return "" +
////                ""
//    }
//
//    private int getToday() {
//        SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMdd" );
//        return Integer.parseInt( sdf.format( System.currentTimeMillis() ) );
//    }

}
